package cn.zhuzicc.basic.jvm.t1;

import java.io.IOException;
import java.nio.ByteBuffer;

/**
 * @author zhaoxiang
 * @version 1.0
 * @description
 * @Date 2021/9/20 14:14
 */
public class Demo1_26 {

    static final int _1Gb = 1024 * 1024 * 1024;

    /**
     * -XX:+DisableExplicitGC // 关闭显示回收
     * @param args
     * @throws IOException
     */
    public static void main(String[] args) throws IOException {
        ByteBuffer byteBuffer = ByteBuffer.allocateDirect(_1Gb);
        System.out.println("分配完毕...");
        System.in.read();
        System.out.println("释放完毕...");
        byteBuffer = null;
        System.gc();
        System.in.read();
    }
}
